package com.stt.weather.design.observer.impl;

import com.stt.weather.model.WeatherData;
import com.stt.weather.design.observer.WeatherObserver;
import com.stt.weather.design.template.NotificationTemplate;
import org.springframework.stereotype.Component;

@Component
public class EmailObserver extends NotificationTemplate implements WeatherObserver {
    
    @Override
    public void update(WeatherData weatherData) {
        processNotification(weatherData);
    }
    
    @Override
    protected void send(String content) {
        System.out.println("发送邮件通知：" + content);
    }
    
    @Override
    public String getType() {
        return "EMAIL";
    }
} 